<!DOCTYPE html>
<html>
<head>
  <title>{{title}}</title>
  {{> includes/head.html }}
</head>
<body>
  {{> includes/header.html }}
  <div class="container-fluid">
    <div class="row">
      <div class="container-fluid col-sm-8">
        <div class="row">
          <div class="col-xs-12">
            {{> includes/userPageHeader.html }}
            <div class="panel panel-default">
              <div class="panel-body">
                <div class="edit-authentication-box">
                  <h2 class="edit-authentication">认证</h2>
                  <div class="input-group col-xs-12">
                    <span class="input-group-addon">
                      <i class="fa fa-user fa-fw"></i>
                    </span>
                    <span class="list-group-item">
                      <strong>{{defaultStrategy}}</strong>
                    </span>
                    <div style="width: 100%;">
                      <div class="input-group-addon">
                        <p class="pull-right"><strong>默认首选 <i class="fa fa-sign-in fa-fw"></i></strong></p>
                      </div>
                    </div>
                  </div>
                  {{#haveOtherStrategies}}
                  {{#usedStrategies}}
                  <div class="input-group col-xs-12">
                    <span class="input-group-addon">
                      <i class="fa fa-user fa-fw"></i>
                    </span>
                    <span class="list-group-item">
                      {{display}}
                    </span>
                    <div style="width: 100%;">
                      <div class="input-group-addon">
                        <a class="btn btn-sm btn-success pull-right" href="/auth/{{strat}}">Make default preferred <i class="fa fa-sign-in fa-fw"></i></a>
                      </div>
                    </div>
                  </div>
                  {{/usedStrategies}}
                  {{/haveOtherStrategies}}
                  {{#unusedStrategies}}
                  <form id="register" method="post" action="/auth/">
                    <div class="input-group col-xs-12">
                      <span class="input-group-addon">
                        <i class="fa fa-user fa-fw"></i>
                      </span>
                      <select name="auth" class="form-control">
                        {{#openStrategies}}
                        <option value="{{strat}}">{{display}}</option>
                        {{/openStrategies}}
                      </select>
                      <div style="width: 100%;">
                        <div class="input-group-addon">
                          <button class="btn btn-sm btn-success pull-right" type="submit">Attach new default preferred <i class="fa fa-sign-in fa-fw"></i></button>
                        </div>
                      </div>
                    </div>
                  </form>
                  {{/unusedStrategies}}
                </div>
                <div class="edit-session-box">
                  <h2 class="edit-session">Session</h2>
                  <div class="session-area list-group">
                    {{#sessionList}}
                      {{> includes/session.html }}
                    {{/sessionList}}
                    {{^sessionList}}
                    <div class="panel">
                      <div class="panel-body">
                        <em>This user hasn't added any sessions yet.</em>
                      </div>
                    </div>
                    {{/sessionList}}
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid col-sm-4">
        {{> includes/userSidePanel.html }}
      </div>
    </div>
  </div>
  {{> includes/footer.html }}
  {{> includes/scripts/clipboard.html }}
</body>
</html>
